package com.ddm.ddm.service.impl;

import com.ddm.ddm.entity.Require;
import com.ddm.ddm.mapper.RequireMapper;
import com.ddm.ddm.query.RequirePage;
import com.ddm.ddm.service.IRequireService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lq
 * @since 2021-07-08
 */
@Service
public class RequireServiceImpl extends ServiceImpl<RequireMapper, Require> implements IRequireService {

  @Autowired
  private RequireMapper requireMapper;

  @Override
  public List<Require> getAll(RequirePage requirePage) {
    return requireMapper.listAll(requirePage);
  }

  @Override
  public int add(Require require) {
    return requireMapper.save(require);
  }

  @Override
  public int UpRequire(Require require) {
    return requireMapper.update(require);
  }

  @Override
  public Require getDetailById(String rid) {
    return requireMapper.selectById(rid);
  }
}
